<template>
  <div>
    <el-descriptions title="请仔细核对订单列表" direction="vertical" :column="4" border>
      <el-descriptions-item label="医生姓名">{{ name }}</el-descriptions-item>
      <el-descriptions-item label="职位">{{ position }}</el-descriptions-item>
      <el-descriptions-item label="挂号科室" :span="2">{{ department }}</el-descriptions-item>
       <el-descriptions-item label="备注">
        <el-tag size="费用明细"></el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="总金额">{{fee}}</el-descriptions-item>
    </el-descriptions>
    <el-button type="primary" @click="next">下一步</el-button>
  </div>
</template>
<script>
export default {
  name: 'HelloWorld',
  data() {
    return {
      name: "",
      position: "",
      department: "",
      fee:""
    }
  },
  created: function () {
    this.$axios.post("http://localhost:8080/doctor/getdp", {
      id: localStorage.getItem("doctorid")
    }).then(r => {
      console.log(r)
      this.name = r.data.data["name"],
        this.position = r.data.data.position["title"],
        this.fee = r.data.data.position["fee"],
        this.department = r.data.data.department["name"]
    }
    )
  },
  methods:{
    next(){
     if (this.$route.path == "/PreMoney") {
        this.$router.push("/PreSuccess");
    
      }
    }
  }

}
</script>
  